from .bigdata_matrix import matrix
from  .mutable_small_matrix.disk_process import *

class vector:
    def __init__(self, file_name):
        """

        :param file_name: the file name containing the vector.
                          while the bigdata_matrix needs a path for it's blocks,
                          the vector should (and could) be stored only in one file.
        """
        super(vector, self).__init__()
        self.file_name = file_name
        # TODO

    def show(self, first=0, last=-1):
        """
        show from position first to last of the vector
        :param first:
        :param last:
        :return:
        """
        # TODO
        ...

    def _read(self, i):
        """
        read the position i of the vector
        :param i:
        :return:
        """
        # TODO
        ...

    def _write(self, i, value):
        """
        write value to the position i of the vector

        :param i:
        :param value:
        :return:
        """
        # TODO
        ...

    def sum(self):
        """
        reduce the vector by summing each position
        this will be used when doing pageranking
        :return:
        """
        # TODO
        ...

    def multiply_big_matrix(self, big_matrix: matrix):
        """
        multiplying the vector with a big_data_matrix
        this will be used when doing pageranking
        :param big_matrix:
        :return:
        """
        # TODO
        ...

    def equal(self, other):
        """
        compare two vectors
        :type other: vector
        :param other:
        :return:
        """
        ...
        # TODO
        return True

    def __eq__(self, other):
        return self.equal(other)
